package com.peach.springbootdemo.demo.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 读取多个配置
 * @author peacher
 * @date 2019-08-01
 * 以 test 开头的属性会自动赋值到对象的属性中
 */
@Component
@ConfigurationProperties(prefix="test")
@Data
public class DemoProperties {
    private String demo;
    private String title;
    private String desc;
}
